home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
elecmail
/
fido1000.zip
/
SRC1000.ZIP
/
MARKALL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-05-21
|
1KB
|
59 lines
#include "gt16.h"
#include "ftsc.h"
#include "transfer.h"
#include <bios.h>
#include <conio.h>
#include <dos.h>
#include <process.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int main(int,char *[]);
int main(int argc, char *argv[])
{
MSG_RECORD *ghdr;
char *fin,*fout;
FILE *fpin,*fpout;
int got;
ghdr = malloc(130);
fin = malloc(80);
fout = malloc(80);
if (argc != 2) exit(1);
strcpy(fin,argv[1]);
strcpy(fout,argv[1]);
strcat(fin,"\\MESSAGE.CTL");
strcat(fout,"\\MESSAGE.$$$");
if ((fpin = fopen(fin,"rb")) == NULL)
{
return(-1);
}
if ((fpout = fopen(fout,"wb")) == NULL)
{
return(-1);
}
while (!(feof(fpin)))
{
got = fread(ghdr,MSGCTLSZ,1,fpin);
ghdr->msg_flags.fidoorg = 1;
if (got) fwrite(ghdr,MSGCTLSZ,1,fpout);
}
fclose(fpin);
fclose(fpout);
filecopy(fin,"H:\MESSAGE.BAK");
filecopy(fout,fin);
remove(fout);
return(0);
}